﻿<%@ Page Title="" Language="C#" MasterPageFile="~/administrator/backend.Master" AutoEventWireup="true" CodeBehind="category-view.aspx.cs" Inherits="VQWEB.administrator.categories.category_view" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content_backend" runat="server">
    <div id="view">
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Script_backend" runat="server">
<script type="text/javascript">
    
    var url_detail = '<%=ResolveUrl("~/administrator/templates/detail.tpl") %>';
    var url_ashx = "/admin/category/handler";
    $(document).ready(function () {
        $.get(url_ashx, { view_category: "view_category", Id: GetId() }, function (data) {
            var obj = $.parseJSON(data);
            $.jqoteload(url_detail, function (templates) {
                var active = (obj.active) ? "Kích hoạt" : "Chưa kích hoạt";
                $('#view').jqoteapp(templates.detail_tpl, { value: "<a href=/admin/category/edit/" + obj.id + ">" + obj.title + "</a>" });
                $('#view').jqoteapp(templates.detail_tpl, { value: obj.content });
                $('#view').jqoteapp(templates.detail_tpl, { value: obj.type });
                $('#view').jqoteapp(templates.detail_tpl, { value: active });
            });

        }); //end handler
    });   //end document

   
    </script>
</asp:Content>
